package com.baizhi.springboot.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Album {
    /*`album_id` int(100) NOT NULL AUTO_INCREMENT,
  `album_name` varchar(100) DEFAULT NULL,
  `album_author` varchar(100) DEFAULT NULL,
  `album_teller` varchar(100) DEFAULT NULL,
  `album_Episodes` int(11) DEFAULT NULL,
  `album_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `album_content` varchar(1000) DEFAULT NULL,
  `album_image` varchar(100) DEFAULT NULL,
  `album_star` int(11) DEFAULT NULL,*/
    private Integer id;
    private String name;
    private String author;
    private String teller;
    private Integer episodes;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;
    private String content;
    private String image;
    private Integer star;



    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getTeller() {
        return teller;
    }

    public void setTeller(String teller) {
        this.teller = teller;
    }

    @Override
    public String toString() {
        return "Album{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", teller='" + teller + '\'' +
                ", episodes=" + episodes +
                ", date=" + date +
                ", content='" + content + '\'' +
                ", image='" + image + '\'' +
                ", star=" + star +
                '}';
    }

    public Integer getEpisodes() {
        return episodes;
    }

    public void setEpisodes(Integer episodes) {
        this.episodes = episodes;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public Integer getStar() {
        return star;
    }

    public void setStar(Integer star) {
        this.star = star;
    }

    public Album() {
    }

    public Album(Integer id, String name, String author, String teller, Integer episodes, Date date, String content, String image, Integer star) {
        this.id = id;
        this.name = name;
        this.author = author;
        this.teller = teller;
        this.episodes = episodes;
        this.date = date;
        this.content = content;
        this.image = image;
        this.star = star;
    }
}
